package com.n4v1.pko.server;

import java.io.IOException;
import java.net.ServerSocket;

import com.n4v1.pko.server.model.World;
import com.n4v1.pko.server.network.clientpackets.AllowConnection;

public class GenericServer {
	public static World world;
	public static ServerSocket ss = null;
	public static Thread t;

	public static void main(String[] args) {
		world = World.getInstance();
		try {
			ss = new ServerSocket(7777);
			System.out.println("Server listenning on : " + ss.getLocalPort());

			t = new Thread(new AllowConnection(ss));
			t.start();

		} catch (IOException e) {
			System.err.println("Port 7777 already used.");
		}

	}
}
